package com.demo.service.impl;

import com.demo.dao.OrderOperateLogMapper;
import com.demo.entity.OrderOperateLog;
import com.demo.service.IOrderOperateLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class OrderOperateLogServiceImpl implements IOrderOperateLogService {

    @Autowired
    private OrderOperateLogMapper oolDao;


    @Override
    public int deleteByPrimaryKey(Long id) {
        return oolDao.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(OrderOperateLog record) {
        return oolDao.insert(record);
    }

    @Override
    public int insertSelective(OrderOperateLog record) {
        return oolDao.insertSelective(record);
    }

    @Override
    public int insertLog(String userId, String operate, String orderId) {
        OrderOperateLog record = new OrderOperateLog();
        record.setUserId(userId);
        record.setOperate(operate);
        record.setOrderId(orderId);
        return oolDao.insertSelective(record);
    }

    @Override
    public int insertLog(String userId, String operate, String orderId, String remark) {
        OrderOperateLog record = new OrderOperateLog();
        record.setUserId(userId);
        record.setOperate(operate);
        record.setOrderId(orderId);
        record.setRemark(remark);
        return oolDao.insertSelective(record);
    }

    @Override
    public OrderOperateLog selectByPrimaryKey(Long id) {
        return oolDao.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(OrderOperateLog record) {
        return oolDao.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(OrderOperateLog record) {
        return oolDao.updateByPrimaryKey(record);
    }
}
